#pragma once

#include <vector>
#include "Globals.h"

#define DIM_SEPARATOR 'x'
#define TILE_SEPARATOR ','
#define PHYS_SEPARATOR ','

namespace game_engine { namespace data_format
{

/*!
 * \class WorldDescriptor
 * \brief 
 */
class WorldDescriptor
{
///////////////////////////////////////////////////////////////////////////////
// Attribute definition
///////////////////////////////////////////////////////////////////////////////
private:
    string filename;
    INT32 worldWidth;
    INT32 worldHeight;
    INT32 tileWidth;
    INT32 tileHeight;
    vector<vector<INT32> > textureId;
    vector<vector<INT32> > physics;

///////////////////////////////////////////////////////////////////////////////
// Method definition
///////////////////////////////////////////////////////////////////////////////
public:
    // Constructors and Destructors
    WorldDescriptor(void);
    WorldDescriptor(const string &file);
    virtual ~WorldDescriptor(void);

    // Others
    void parse(void) throw(...);

    // Getters
    const string& getFilename(void) const;
    const INT32 getWorldWidth(void) const;
    const INT32 getWorldHeight(void) const;
    const INT32 getTileWidth(void) const;
    const INT32 getTileHeight(void) const;
    const INT32 getTextureId(const UINT32 x, const UINT32 y) const;
    const INT32 getPhysicsInfo(const UINT32 x, const UINT32 y) const;

};

}}
